package thread.threaddemo;

/**
 * @Author: wenjingyuan
 * @Date: 2022/11/18/20:02
 * @Description:可重入性
 */
public class ThreadSynchronized4 {
    public static void main(String[] args) {
        synchronized (ThreadSynchronized4.class){
            System.out.println("当前线程获得了锁");
            synchronized (ThreadSynchronized4.class){
                System.out.println("主线程再次获得了锁");
            }
        }
    }
}
